package org.dfg.corejava.designPattern.iterator;

/**
 * 迭代器模式<br/>
 * 为一系列聚集提供统一的遍历(顺序访问)能力，而不暴露其内部表示
 * @author DingFugui
 */
public class IteratorTest {

	public static void main(String[] args) {
		Aggregate a = new Aggregate("a","b","c","d");
		while(!a.isDone()){
			System.out.println(a.currentItem());
			a.next();
		}
	}
}
